package com.example.MastAndSlave.service.impl;

import com.example.MastAndSlave.domain.User;
import com.example.MastAndSlave.mapper.UserMapper;
import com.example.MastAndSlave.service.MasService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class MasServiceImpl implements MasService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectUserById(int i) {
       return userMapper.selectUserById(i);
    }

    @Transactional
    @Override
    public int insertUser(User u) {
        return userMapper.insertUser(u);
    }
}
